NodeJS Mysql Data Return

I am using the mysql Node module and returning data as expected, problem is the data format. I am getting back like this:
 [Object { cbid=3998126, entity_id=195082435, store_id=2147483647, more...}, Object { cbid=10845319, entity_id=195082435, store_id=2147483647, more...}
But I need the data to come back like [[ "3998126", "195082435", "2147483647", more...], ["10845319","195082435","2147483647", more]], so I can use it as data for a dataTable.

I was told it has something to do with the content-type but I can't find any info on how to set the content type in the mysql function. I'm told it should be ('content-type', 'application/json'), but don't know where to set it??   Or any other solution that would work.  I can't find a way to grab the value or each key-value pair. Any assistance would be great!
kevbob650Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
it's coming back in JSON format already:
[Object { cbid=3998126, entity_id=195082435, store_id=2147483647, more...}, Object { cbid=10845319, entity_id=195082435, store_id=2147483647, more...}
 that's an array of JSON objects.

Use a for loop

for (x in myarray) {
    obj = myarray[x];
    obj.cbid; // this is how you access each records columns
    obj.entity_id;
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kevbob650Author Commented:
Thanks, that makes sense!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.