Describe the problem/error/question
I have the following JSON that has different values has a label, I am trying to “normalize” in order to create an Array List, followed a couple of topics here, but what I applied so far is not working.
[
{
"category": {
"name": "Categories",
"types": [
"post"
]
},
"post_tag": {
"name": "Tags",
"types": [
"post",
"event",
"place"
]
},
"nav_menu": {
"name": "Navigation Menus",
"types": [
"nav_menu_item"
]
},
"wp_pattern_category": {
"name": "Pattern Categories",
"types": [
"wp_block"
]
}
}
]
What is the error message (if any)?
I am trying to join the data to a list format such where the highest hierarchy values will be set “linear” as “Type” as below:
[
{
"Type": "Category",
"name": "Categories",
"types": [
"post"
]
},
{
"Type": "post_tag",
"name": "Tags",
"types": [
"post",
"event",
"place"
]
},
{
"Type": "nav_menu",
"name": "Navigation Menus",
"types": [
"nav_menu_item"
]
},
{
"Type": "wp_pattern_category",
"name": "Pattern Categories",
"types": [
"wp_block"
]
}
]
Thank you very much in advance for the help.
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup - 1.16.0
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker