User bio
404 bio not found
Member since Dec 23, 2024
Replies:

I am executing below code snipped taking input from stream. and in my input there are multiple json rows. I am using below code to convert the stream into json and then want to loop through all the rows. Can you please recommend how to approach this. Below is what I have coded but nothing gets printed in the terminal

Set stream=##class(%Stream.FileCharacter).%New()

             //Set sc=stream.LinkToFile("C:\InterSystems\IRISHealth\mgr\irislocaldata\stream\DF_COMM_EDW_EX_MED_HIST_2024_12_09_20_31_50_0.json")

             Set sc=stream.LinkToFile("test_test.json")

             write "test"

             set myobj = ##class(%DynamicAbstractObject).%FromJson(stream)

             set iterator = myobj.%GetIterator()

             while iterator.%GetNext(.key, .value) {

                set type = myobj.%GetTypeOf(key)

                write "Key: ", key, !

             }

Certifications & Credly badges:
sandeep has no Certifications & Credly badges yet.
Global Masters badges:
sandeep has no Global Masters badges yet.
Followers:
sandeep has no followers yet.
Following:
sandeep has not followed anybody yet.