Change query JSON to match that generated by the UI