Improved returning indexes json