How do I split strings?

kobeq
kobeq New Altair Community Member
edited November 5 in Community Q&A

First off I used the JSON to Data operator, then I selected an attribute called reviews, it contains a string with the review and the Reviewer.

Format: "Review" Reviewer

it may also have ratings like 4.0/5. How do I split the review inside the "" from the reviewer. My goal is to split them both and turn the review attribute into an array that contains them both but separated. I may also want to separate the rating or disregard it.

Tagged:

Answers

  • RolandJones
    RolandJones
    Altair Employee
    edited October 21

    Hi @kobeq,

    I would recommend looking at using the Split operator. I've attached a very small example making some assumptions around your data.

    Best,

    Roland