Hello Together,
I have a for each of a JObject(“value”). When retrieving data it works for Item(“Message”) and Item(“TimeStamp”).
But for all of the other datapoints in the JObject (e.g., logType, processName), I get the error message “Object reference not set to an instance of an object”. Any ideas?
Thank you!
EDIT: JSON data came from Orchestrator Https Request: The parameters were in the raw message, which is why they were not found
Try to debug, put a breakpoint at the value and check what type of value you are getting when you type currentItem2 and according to that you can put the values like logType or anyother sub loop is there
Hi @ppr and @J0ska
thanks, but the JSON properties are not case-sensitive. It is working for “message” and “timeStamp”. In my program, I also respected the case. But while it is working for “Message” it is not working for “logType”, where the case sensitivity is correct.
@Srini84 thank you for the advice but the second screenshot displays the value I am getting for currentItem2. All values are included, which is why I don’t know why it is not working the same…
I just tested one more thing:
I get the error message using “level”, which is case sensitive
When I change it to “Level”, which is actually not case-sensitive, it works. Yet, “Logtype” or “LogType” or “logType” does not work. I can’t make sense of it.
Just in case: I am retrieving Orchestrator https data for robotlogs. Maybe this is related to the error?
And I tested it again. It works for “Message”. And now I created also a series as you did and noticed that it stopped working for “message”. And I get the same error for “message” as for “logType”. “Level” works and “level” does not work.
Business Case:
Retrieving data from Orchestrator (robotlogs) and transferring them into our data warehouse.
I think that was the issue. I only deserialized it once. I did not know about the second deserialization. That makes sense. I will test it but I think this is the solution!