Allow repeat keys in JSON queries

/cc @puzza007