Loop over JSON object in view now works