I am looking to extract a specific field data from a JSON list
Here is the example JSON data:
{
"data": [
{"answer": "Yes","email": "aaaa.cpm","color": "Maroon"},
{"answer": "No","email": "bbbb.cpm","color": "White"},
{"answer": "Yes","email": "cccc.cpm","color": "Black"}
]}
In my service file
getCarsSmall() {
return this.http.get<any>('assets/data/cars-large.json').suscribe(d=>{
console.log(d)
})
}
The desired output should look like this
Output
[{"email": "aaaa.cpm","color": "Maroon"},{"email": "bbbb.cpm","color": "White"},{"email": "cccc.cpm","color": "Black"}]