We have updated our Terms of Service, Code of Conduct, and Addendum.

How I can Parse Array of array in cribl stream. Each array element contains multiple strings.

Mad Mystery
Mad Mystery Posts: 2

Best Answer

  • Jon Rust
    Jon Rust Posts: 444 mod
    Answer ✓

    True is not a valid javascript object, unless you're referring a variable named True that you have defined elsewhere.

    Using an Eval function with JSON.parse worked as expected with your example array, once True was replaced with true

Answers

  • Jon Rust
    Jon Rust Posts: 444 mod
    edited August 18

    A sample of the data would be super helpful. Normally the Parser command would do the job. You can also use JSON.parse(field)in an Eval field definition.

  • Mad Mystery
    Mad Mystery Posts: 2
    edited August 18

    Hey @Jon Rust , thank you so much for your response ,this is the format of data (shown below)that we are getting. We are getting this data from azure blob storage.

    2D array of strings


    [ ["some fields","some more fields" , 5,null ],["some fields","some more fields" , True,null,false,"",""],[],[],……….,[] ]

    Please suggest feasible solution as I am pretty much stucked.

  • Jon Rust
    Jon Rust Posts: 444 mod
    Answer ✓

    True is not a valid javascript object, unless you're referring a variable named True that you have defined elsewhere.

    Using an Eval function with JSON.parse worked as expected with your example array, once True was replaced with true