Help with nested Json

Help with nested Json

I've seen this same question answered in the forum but after hours of trying I'm still not getting it right. I have a nested Json that I need to extract some data from. The Json looks like this:

{
  "objects": [
    {
      "name": "numero_movil",
      "objectType": "field",
      "value": "Tu número móvil:615647486",
      "pageIndex": 0,
      "rectangle": [0, 0, 0, 0]
    },
    {
      "name": "codigo_pin",
      "objectType": "field",
      "value": "Tu código PIN: 6342",
      "pageIndex": 0,
      "rectangle": [0, 0, 0, 0]
    },
    {
      "name": "codigo_puk",
      "objectType": "field",
      "value": "Tu código PUK: 78087660",
      "pageIndex": 0,
      "rectangle": [0, 0, 0, 0]
    }
  ],
  "elapsed": 0.0146939,
  "templateName": "esim_details",
  "templateVersion": "4",
  "timestamp": "2024-05-16T23:03:26"
}

I would like to do a get("") to obtain the values of numero_movil, codigo_pin and codigo_puk. But if I use toMap() it gives me an error saying it has an invalid json format. I don't know how to break it up or turn it into something ZC will deem valid json. What should I do?

I thought of a workaround using a string search and regex. Doesn't seem as elegant but will be my plan B if I can't find a way to do this.

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now