Removes trailling spaces on json filter