I have a problem when searching for an attribute of a json variable.
In my project, I need to use a WS that returns a json file with several attributes.
After that I need to insert the information of this json file into the database and that’s where the problem lies.
There is a json attribute that is not present in every file so when I try to do
varJson.Item("x-cod") it gives an error in the project, but only when the
"x-cod" attribute does not exist in the file.
Is there any way to validate if the error and if it doesn’t exist returns 0, null or something else?