Convert JSON array of objects to string array using Typescript
This should do the job:
arrayList: Array<string> = jsonObject.map(person => person.name); // => ["Bill Gates", "Max Payne", "Trump", "Obama"]
This should do the job:
arrayList: Array<string> = jsonObject.map(person => person.name); // => ["Bill Gates", "Max Payne", "Trump", "Obama"]