Fastapi Post Method Javascript Array Sort Function Python