I have a string
(ProductAttributes,MapType(StringType,StructType(
List( (CurrentValue,StringType,true), (OldValue,StringType,true),
(LastValue,StringType,true))),true),true)
I need to extract StructType(List( (CurrentValue,StringType,true), (OldValue,StringType,true), (LastValue,Stringy )
I've used string.split using separator as "," but I'm not getting the entire struct string.The string I got while using ","
(ProductAttributes
MapType(StringType
StructType(List( (CurrentValue
StringType true)
(OldValue StringType true)
(LastValue StringType true))) true) true)
I can give the count parameter as '3' but my string might change.I tried giving separator as '()' the got the full string .
The expected result is something like this.I can build this string using an object but extracting the values from the string is a blocker for me now
{"FieldId":"401","Name":"CurrentValue","Type":"string","ParentName":"ProductAttributes>CurrentValue","ParentId":"4"}
Another string example would be:
(BusinessRules,ArrayType(StructType(List( (Id,IntegerType,true), (ErrorCode,IntegerType,true), (Overrides,ArrayType(StructType(List( (OverrideSource,IntegerType,true), (IsOverridden,BooleanType,true), (ReasonId,IntegerType,true), (OverriddenBy,StringType,true), (OverrideDate,LongType,true), (DependencyProductAttributeIds,ArrayType(IntegerType,true),true))),true),true))),true),true)