I have this example of Json's structure
[
{
"idgoOperacion": 256,
"Destino": "Actividades Comunitarias",
"Tipo de Solicitante": "-",
"Superficie Otorgada": "",
"Lugar de Firma": "",
"Fecha de Firma": ""
},
{
"idgoOperacion": 263,
"Destino": null,
"Tipo de Solicitante": null,
"Superficie Otorgada": null,
"Lugar de Firma": null,
"Fecha de Firma": null
},
{
"idgoOperacion": 266,
"Destino": "Cultura",
"Tipo de Solicitante": "Civil",
"Superficie Otorgada": "17",
"Lugar de Firma": "",
"Fecha de Firma": "21/06/2015"
},
{
"idgoOperacion": 270,
"Destino": null,
"Tipo de Solicitante": null,
"Superficie Otorgada": valor,
"Lugar de Firma": "",
"Fecha de Firma": null
},
{
"idgoOperacion": 273,
"Destino": null,
"Tipo de Solicitante": null,
"Superficie Otorgada": null,
"Lugar de Firma": null,
"Fecha de Firma": null
},
{
"idgoOperacion": 274,
"Destino": null,
"Tipo de Solicitante": null,
"Superficie Otorgada": valor,
"Lugar de Firma": valor,
"Fecha de Firma": valor
}]
and I have a table with two fields, idgoOperacion, Json.
I need to save the json in the following way for each operation number and so on
idgoOperacion = 256
Json = {"idgoOperacion": 256,"Destino": "Actividades Comunitarias",
"Tipo de Solicitante": "-","Superficie Otorgada": "","Lugar de
Firma": "","Fecha de Firma": ""}
and so on.
Try to get the value of the Json in the following way but do not manage to go through the complete json and get the value of idgoOperacion.
JArray jsonPreservar = JArray.Parse(jsonText);
dynamic data = JObject.Parse(jsonPreservar[0].ToString());