Match objects array with fields array in JSON output