Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I tried Simple Jolt transformation but its not working

I want to convert this data using jolt, I tried but it showing null as result

Input :

{
  "employer": [
    {
      "id": "98",
      "place_id": "7871",
      "name": "Iti-ha-cho"
    }
  ]
}

Expected Output :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

{
  "id" : "98",
  "place_id" : "7871",
  "name" : "Iti-ha-cho"
}

Jolt Spec I tried but didnt work :

{
  "operation": "shift",
  "spec": {
    "employer": {
      "id": "[&1].&",
      "place_id": "place_id",
      "name": "name"
    }
  }
}

>Solution :

While the current issue is due to missing square bracket nesting the spec, you don’t need to specify those long stuff, just the following spec will suffice

[
  {
    "operation": "shift",
    "spec": {
      "employer": {
        "*": ""
      }
    }
  }
]

as you only want to extract the sub-content of the employer array.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading