We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I use similar kind of multi-array set. I am using the below input:
var test=[ { "CODE": "AA", "GROUP_NAME": "aaaaaa", "GROUP_DESC": "aaaaaaaaa", "CHILD_GROUP": [ { "CODE": "AA", "GROUP_NAME": "aaaaaa", "CHILD_CODE": "bb" }, { "CODE": "AA", "GROUP_NAME": "aaaaaa", "CHILD_CODE": "cc" }, { "CODE": "AA", "GROUP_NAME": "aaaaaa", "CHILD_CODE": "dd" } ] } ] jsonexport(test,function(err, csv){ if(err) return console.log(err); console.log(csv); }); And my output is :
CODE,GROUP_NAME,GROUP_DESC,CHILD_GROUP.CODE,CHILD_GROUP.GROUP_NAME,CHILD_GROUP.CHILD_CODE AA,aaaaaa,aaaaaaaaa,AA,aaaaaa,bb ,,,AA,aaaaaa,cc ,,,AA,aaaaaa,dd
The first child is getting appended to the parent. Could you please provide a solution for this???
I need the output like this: AA,aaaaaa,aaaaaaaaa ,,,AA,aaaaaa,bb ,,,AA,aaaaaa,cc ,,,AA,aaaaaa,dd
The text was updated successfully, but these errors were encountered:
Duplicate #22
Sorry, something went wrong.
No branches or pull requests
Hi,
I use similar kind of multi-array set. I am using the below input:
var test=[
{
"CODE": "AA",
"GROUP_NAME": "aaaaaa",
"GROUP_DESC": "aaaaaaaaa",
"CHILD_GROUP": [
{
"CODE": "AA",
"GROUP_NAME": "aaaaaa",
"CHILD_CODE": "bb"
},
{
"CODE": "AA",
"GROUP_NAME": "aaaaaa",
"CHILD_CODE": "cc"
},
{
"CODE": "AA",
"GROUP_NAME": "aaaaaa",
"CHILD_CODE": "dd"
}
]
}
]
jsonexport(test,function(err, csv){
if(err) return console.log(err);
console.log(csv);
});
And my output is :
CODE,GROUP_NAME,GROUP_DESC,CHILD_GROUP.CODE,CHILD_GROUP.GROUP_NAME,CHILD_GROUP.CHILD_CODE
AA,aaaaaa,aaaaaaaaa,AA,aaaaaa,bb
,,,AA,aaaaaa,cc
,,,AA,aaaaaa,dd
The first child is getting appended to the parent. Could you please provide a solution for this???
I need the output like this:
AA,aaaaaa,aaaaaaaaa
,,,AA,aaaaaa,bb
,,,AA,aaaaaa,cc
,,,AA,aaaaaa,dd
The text was updated successfully, but these errors were encountered: