Php Array Sort By Key Value Javascript Map