I have valid json data that combines an array of people with two meta fields (see attached graphic). I do this because my service either returns up to 1000 people in a json array or generates a CSV file for pickup on the web server. Well, i am getting an error here:
The json returned is basically:
{"peoples":[{"fname":"Cord","lname":"Thomas","angularskills":"newb"},{"fname":"Other","lname":"Person","angularsills":"expert"}],"datatype":"people","outputtype":"json"}
Any thoughts on what i might do to correct this. I recognize this is not an angular issue, but looking for some guidance on how i might structure this to parse properly.
My goal is that in the template, i would read the outputtype as (json|csv) and present accordingly, either a list of people or a link to the csv file...
Appreciate your help with this!
Cord