json modifications to sql select