The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
cut operator problem
kazemi_asghar
Member Posts: 8 Learner I
in Help
hi guys
i have an attribute whit this type of data:
[ { "_id" : "ka5b14ub", "mineralTypeId" : "k5bza8u2", "group" : { "$numberInt" : "3" }, "flloorNo" : { "$numberInt" : "1" }, "wht0003" : { "$numberInt" : "20000000" }, "productionRate" : { "$numberInt" : "2000000" } } ]
i want to cut characters from index 43 to 51.but i face whit this error: string index out of range : -39
can you please help me?
Tagged:
0
Answers
I've mimicked the logic and it should work fine, you should verify what is entering the cut process, to see if it still containing the full string to start with and not cut off somewhat in the middle due to the format of your string...
I assume you want to get a certain value out of your string(s) but as they will be different line by line that will never work.
So you need to use regex or in this case better json path
Like in attached examples
Now, rather than cut you may be better of with the split operator if you want to extract specific data as your cut positions will be different for every row.
Would you mind sharing your process and a sample excel file?