change store format to json map instead of json arr.

remove sort_and_comp function