Flatten JSON files into CSV files
Created by @schelluri The pipeline pattern flattens a JSON file, which has multiple objects, and turns it into a CSV file. Configuration Sources: JSON Generator Targets: CSV file Snaps used: JSON Generator, JSON Formatter, JSON Parser, Script, CSV Formatter, File Writer Downloads MS_Flatten_Script.slp (31.4 KB)7.4KViews1like2CommentsSwap keys and values
Hi, I have a use case of lookup function where I have to use the same expression library but the lookup will happen both on the basis of key and value pair. Below is the expression library that I have uploaded { “Lookup”: { “Key1”: “Value1”, “Key2”: “Value2”, “Key3”: “Value3”, “Key4”:“Value4” } } Now I will get value1 from previous snaps, I want to use value1 to retrieve data as Key1. Can you suggest how this can be achieved? Regards, Shreegeet2.4KViews1like2CommentsMixed array and object JSON
Hello, I have a feed coming from github which I need to get certain attributes but some of the items are being returned as arrays and some are being returned as objects! Does anyone know how I can align the 2 types together to perform downstream tasks? [ [{ "name": "stale.yml", "path": ".github/workflows/stale.yml", "sha": "xx", "size": 425, "url": "https://api.github.com/owners/Owner/repo/contents/.github/workflows/stale.yml?ref=BTRANCH", "html_url": "https://github.com/Owner/repo/blob/BTRANCH/.github/workflows/stale.yml", "git_url": "https://api.github.com/owners/Owner/repo/git/blobs/1234", "download_url": "https://raw.githubusercontent.com/Owner/repo/BTRANCH/.github/workflows/stale.yml?token=xx", "type": "file", "_links": { "self": "https://api.github.com/owners/Owner/repo/contents/.github/workflows/stale.yml?ref=BTRANCH", "git": "https://api.github.com/owners/Owner/repo/git/blobs/1234", "html": "https://github.com/Owner/repo/blob/BTRANCH/.github/workflows/stale.yml" } }], { "name": "pipeline", "path": "BLAH/pipeline", "sha": "1234", "size": 40246, "url": "https://api.github.com/owners/Owner/repo/contents/BLAH/pipeline?ref=BTRANCH", "html_url": "https://github.com/Owner/repo/blob/BTRANCH/BLAH/pipeline", "git_url": "https://api.github.com/owners/Owner/repo/git/blobs/1234", "download_url": "https://raw.githubusercontent.com/Owner/repo/BTRANCH/BLAH/pipeline?token=xx", "type": "file", "content": "xx" "encoding": "base64", "_links": { "self": "https://api.github.com/owners/Owner/repo/contents/BLAH/pipeline?ref=BTRANCH", "git": "https://api.github.com/owners/Owner/repo/git/blobs/1234", "html": "https://github.com/Owner/repo/blob/BTRANCH/BLAH/pipeline" } } ]Solved3.9KViews1like4Comments