0
"fieldX" : [
            {
              "variavelA" : "resultado",
              "variavelB" : "3",
              "variavelC" : "Concluído",
              "date" : {
                "__type" : "Date",
                "iso" : "2021-08-26T03:00:00.000Z"
              }
            }{
              "variavelA" : "resutlado",
              "variavelB" : "3",
              "variavelC" : "Concluído",
              "date" : {
                "__type" : "Date",
                "iso" : "2021-08-27T03:00:00.000Z"
              }
            }
          ]

In my dataset I have a field x with a array with json structure inside it, which can range from 0 to 12, I would like to treat this data by including in new columns at the end of my dataset, for example "variableA" would be converted to "variableA1" until the "variableA12" with its respective value and so it would repeat for all variables within fieldX having something like this:

fieldX variavelA1 variavelB1 variavelC date1 variavelA2 variavelB2 variavelC2 date2
value value value value 2021-08-26 value value value 2021-08-27
value value value value 2021-08-26 value value value 2021-08-27
value value value value 2021-08-26 value value value 2021-08-27
  • 2
    Please, provide *minimal reproducible example*. This includes a sample dataset such as by using the `dput` command. See here for more information: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610 – Colombo Oct 26 '21 at 19:15

0 Answers0