With some help from fellow stack users I currently have this:
I would like to know what I need to do to edit the code to change the JSON data {location.city} to delete after the first comma so this:
Mansfield, MA, US
becomes
Mansfield
Apologies, I am a beginner, a working jsfiddle would be much appreciated. Thank you.
Here’s one way to do it:
I’ve updated the JSFiddle with a working example: http://jsfiddle.net/XRCvE/1/