Making json format more query-friendly by grouping under keys