Result M Getting Comment Put Want Grab Cities Sql Query Put Array Javascript Q43787519
The result I’m getting is the comment I put. I just want to grabthe Cities in a sql query and put them in an array.
This is in javascript.
![var resultArray = JSON.parse(JSON.stringify(dbConnection)); //{ results: [{ City: 91007 }, { City: 95060 } ] } for (var k](https://media.cheggcdn.com/media/9e7/9e745e7c-9ffb-4f51-b7f8-7cb660dbe359/phpbwkSkt.png)
var resultArray = JSON.parse(JSON.stringify(dbConnection)); //{ results: [{ City: ‘91007’ }, { City: ‘95060’ } ] } for (var key in resultArray) { copyArray.push(resultArray [key]); for(var i in copyArray) { console.log(copyArray[i]); Show transcribed image text var resultArray = JSON.parse(JSON.stringify(dbConnection)); //{ results: [{ City: ‘91007’ }, { City: ‘95060’ } ] } for (var key in resultArray) { copyArray.push(resultArray [key]); for(var i in copyArray) { console.log(copyArray[i]);
Expert Answer
Answer to The result I’m getting is the comment I put. I just want to grab the Cities in a sql query and put them in an array. Thi…
OR