How to loop through all properties in a JSON object.