node-jq | Node.js wrapper for jq | JSON Processing library
kandi X-RAY | node-jq Summary
kandi X-RAY | node-jq Summary
Node.js wrapper for jq
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Generates boolean schema
node-jq Key Features
node-jq Examples and Code Snippets
Community Discussions
Trending Discussions on node-jq
QUESTION
The goal is to, on a timer, extract JSON from a proprietary content management system, transform it into a CSV, and deposit that CSV in an Office 365 shared drive.
The combination of an Azure Function and Azure Logic App make this possible. In its current state the Node/JavaScript Azure Function (code below) (1) successfully retrieves the JSON object and (2) successfully sends an object to the Azure Logic App, which successfully receives it.
After that, the Logic App has a built-in JSON-to-CSV "action". The input must be in an array.
From Microsoft documentation:
However, despite much struggle I am unsuccessful turning the object into an array.
Because I am familiar with the basics of the jq JSON manipulation language, I spent much time with the node-jq npm package. I was unsuccessful. So I turned to Lodash. Following the JSON and code below are a sliver of my failed attempts.
Original JSON: ...ANSWER
Answered 2020-Oct-12 at 19:21If I understand it correctly, Azure context aside, you want to convert your original JSON into desired (flat) format.
Here's a basic version for which you don't need any external dependencies:
convert-to-flat-array.js
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-jq
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page