Perl or AWK transform JSON to CSV?How to correctly invoke awk in Perl to print out the 3rd last field in a...

Why was the Spitfire's elliptical wing almost uncopied by other aircraft of World War 2?

Multiple options vs single option UI

Relationship between strut and baselineskip

How exactly does Hawking radiation decrease the mass of black holes?

How can I practically buy stocks?

How to prevent z-fighting in OpenSCAD?

Why do games have consumables?

Initiative: Do I lose my attack/action if my target moves or dies before my turn in combat?

Betweenness centrality formula

Extension of 2-adic valuation to the real numbers

Why does Mind Blank stop the Feeblemind spell?

Re-entry to Germany after vacation using blue card

Apply MapThread to all but one variable

Does a large simulator bay have standard public address announcements?

Implications of cigar-shaped bodies having rings?

What is the smallest unit of eos?

On The Origin of Dissonant Chords

As an international instructor, should I openly talk about my accent?

Minor Revision with suggestion of an alternative proof by reviewer

What happened to Captain America in Endgame?

How to limit Drive Letters Windows assigns to new removable USB drives

Can we say “you can pay when the order gets ready”?

How do I reattach a shelf to the wall when it ripped out of the wall?

555 timer FM transmitter



Perl or AWK transform JSON to CSV?


How to correctly invoke awk in Perl to print out the 3rd last field in a line?Searching for patterns in csv filesLooping through csv, removing patternscsv file adding and removing characters from rowsHow to transform valid JSON to CSV?Using awk command in perl scriptJSON Valdiator in Ubuntu 16.04how to use awk in perl?Delete multiple rows in csv fileChanging second column in csv conditionally






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I'm trying to extract information from a JSON file and write some of the contents to a CSV file.



Here is an example of my text:



{
"_id": "c0c5717edc0ff715b",
"phone_number": "+60605420",
"phone_verified": true,
"name": "+60605420",
"clientID": "uPVQOoHqXqBwiBCjBu",
"__tenant": "tdwidm",
"updated_at": {
"$date": "2019-01-06T13:43:00.523Z"
},
"picture": "https://google.com/avatars/6.png",
"user_id": "blr|56b1b3022ff0ad17b4f858db",
"lastLogin": {
"$date": "2018-12-24T14:04:16.705Z"
},
"lastIP": "36.72.55.153",
"nickname": "+60605420",
"identities": [
{
"profileData": {
"phone_number": "+60605420",
"phone_verified": true,
"name": "+60605420"
},
"user_id": "56b1b3022ff0ad17b4f858db",
"provider": "sms",
"connection": "sms",
"isSocial": false
}
],
"created_at": {
"$date": "2016-02-03T07:58:17.868Z"
},
"loginsCount": 19,
"user_metadata": {
"language": "id",
"title": "Nn",
"firstName": "Rain",
"lastName": "Drop",
"isPasswordReset": false
},
"metadata": {
"signed_up": true
}
}


Kindly help for this case using perl or awk or gawk?










share|improve this question









New contributor




Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    jq has a @CSV filter - if you want help, you will need to be specific about what exactly you want to extract

    – steeldriver
    14 hours ago











  • welcome to ask ubuntu. this question appears to be off topic as it doesn’t seem to have anything to do with ubuntu, if it does please edit your question to make it clear how it relates to ubuntu. This question probably belongs on a different stack exchange site, most likely stackoverflow.

    – Jeff
    14 hours ago


















0















I'm trying to extract information from a JSON file and write some of the contents to a CSV file.



Here is an example of my text:



{
"_id": "c0c5717edc0ff715b",
"phone_number": "+60605420",
"phone_verified": true,
"name": "+60605420",
"clientID": "uPVQOoHqXqBwiBCjBu",
"__tenant": "tdwidm",
"updated_at": {
"$date": "2019-01-06T13:43:00.523Z"
},
"picture": "https://google.com/avatars/6.png",
"user_id": "blr|56b1b3022ff0ad17b4f858db",
"lastLogin": {
"$date": "2018-12-24T14:04:16.705Z"
},
"lastIP": "36.72.55.153",
"nickname": "+60605420",
"identities": [
{
"profileData": {
"phone_number": "+60605420",
"phone_verified": true,
"name": "+60605420"
},
"user_id": "56b1b3022ff0ad17b4f858db",
"provider": "sms",
"connection": "sms",
"isSocial": false
}
],
"created_at": {
"$date": "2016-02-03T07:58:17.868Z"
},
"loginsCount": 19,
"user_metadata": {
"language": "id",
"title": "Nn",
"firstName": "Rain",
"lastName": "Drop",
"isPasswordReset": false
},
"metadata": {
"signed_up": true
}
}


Kindly help for this case using perl or awk or gawk?










share|improve this question









New contributor




Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    jq has a @CSV filter - if you want help, you will need to be specific about what exactly you want to extract

    – steeldriver
    14 hours ago











  • welcome to ask ubuntu. this question appears to be off topic as it doesn’t seem to have anything to do with ubuntu, if it does please edit your question to make it clear how it relates to ubuntu. This question probably belongs on a different stack exchange site, most likely stackoverflow.

    – Jeff
    14 hours ago














0












0








0








I'm trying to extract information from a JSON file and write some of the contents to a CSV file.



Here is an example of my text:



{
"_id": "c0c5717edc0ff715b",
"phone_number": "+60605420",
"phone_verified": true,
"name": "+60605420",
"clientID": "uPVQOoHqXqBwiBCjBu",
"__tenant": "tdwidm",
"updated_at": {
"$date": "2019-01-06T13:43:00.523Z"
},
"picture": "https://google.com/avatars/6.png",
"user_id": "blr|56b1b3022ff0ad17b4f858db",
"lastLogin": {
"$date": "2018-12-24T14:04:16.705Z"
},
"lastIP": "36.72.55.153",
"nickname": "+60605420",
"identities": [
{
"profileData": {
"phone_number": "+60605420",
"phone_verified": true,
"name": "+60605420"
},
"user_id": "56b1b3022ff0ad17b4f858db",
"provider": "sms",
"connection": "sms",
"isSocial": false
}
],
"created_at": {
"$date": "2016-02-03T07:58:17.868Z"
},
"loginsCount": 19,
"user_metadata": {
"language": "id",
"title": "Nn",
"firstName": "Rain",
"lastName": "Drop",
"isPasswordReset": false
},
"metadata": {
"signed_up": true
}
}


Kindly help for this case using perl or awk or gawk?










share|improve this question









New contributor




Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I'm trying to extract information from a JSON file and write some of the contents to a CSV file.



Here is an example of my text:



{
"_id": "c0c5717edc0ff715b",
"phone_number": "+60605420",
"phone_verified": true,
"name": "+60605420",
"clientID": "uPVQOoHqXqBwiBCjBu",
"__tenant": "tdwidm",
"updated_at": {
"$date": "2019-01-06T13:43:00.523Z"
},
"picture": "https://google.com/avatars/6.png",
"user_id": "blr|56b1b3022ff0ad17b4f858db",
"lastLogin": {
"$date": "2018-12-24T14:04:16.705Z"
},
"lastIP": "36.72.55.153",
"nickname": "+60605420",
"identities": [
{
"profileData": {
"phone_number": "+60605420",
"phone_verified": true,
"name": "+60605420"
},
"user_id": "56b1b3022ff0ad17b4f858db",
"provider": "sms",
"connection": "sms",
"isSocial": false
}
],
"created_at": {
"$date": "2016-02-03T07:58:17.868Z"
},
"loginsCount": 19,
"user_metadata": {
"language": "id",
"title": "Nn",
"firstName": "Rain",
"lastName": "Drop",
"isPasswordReset": false
},
"metadata": {
"signed_up": true
}
}


Kindly help for this case using perl or awk or gawk?







awk perl csv json






share|improve this question









New contributor




Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 7 hours ago









Kaz Wolfe

26.3k1378136




26.3k1378136






New contributor




Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 15 hours ago









Andie LieAndie Lie

1




1




New contributor




Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Andie Lie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1





    jq has a @CSV filter - if you want help, you will need to be specific about what exactly you want to extract

    – steeldriver
    14 hours ago











  • welcome to ask ubuntu. this question appears to be off topic as it doesn’t seem to have anything to do with ubuntu, if it does please edit your question to make it clear how it relates to ubuntu. This question probably belongs on a different stack exchange site, most likely stackoverflow.

    – Jeff
    14 hours ago














  • 1





    jq has a @CSV filter - if you want help, you will need to be specific about what exactly you want to extract

    – steeldriver
    14 hours ago











  • welcome to ask ubuntu. this question appears to be off topic as it doesn’t seem to have anything to do with ubuntu, if it does please edit your question to make it clear how it relates to ubuntu. This question probably belongs on a different stack exchange site, most likely stackoverflow.

    – Jeff
    14 hours ago








1




1





jq has a @CSV filter - if you want help, you will need to be specific about what exactly you want to extract

– steeldriver
14 hours ago





jq has a @CSV filter - if you want help, you will need to be specific about what exactly you want to extract

– steeldriver
14 hours ago













welcome to ask ubuntu. this question appears to be off topic as it doesn’t seem to have anything to do with ubuntu, if it does please edit your question to make it clear how it relates to ubuntu. This question probably belongs on a different stack exchange site, most likely stackoverflow.

– Jeff
14 hours ago





welcome to ask ubuntu. this question appears to be off topic as it doesn’t seem to have anything to do with ubuntu, if it does please edit your question to make it clear how it relates to ubuntu. This question probably belongs on a different stack exchange site, most likely stackoverflow.

– Jeff
14 hours ago










0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Andie Lie is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1138307%2fperl-or-awk-transform-json-to-csv%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








Andie Lie is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Andie Lie is a new contributor. Be nice, and check out our Code of Conduct.













Andie Lie is a new contributor. Be nice, and check out our Code of Conduct.












Andie Lie is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1138307%2fperl-or-awk-transform-json-to-csv%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

Simple Scan not detecting my scanner (Brother DCP-7055W)Brother MFC-L2700DW printer can print, can't...