If you are able to use a Data Flow activity, go ahead. You can use aderived column to parse the string into a JSON object with an expression like fromJSON()
or similar to parse the string into a JSON object.
Once you have the JSON object, you can extract the lastPage
number by accessing the appropriate key in the JSON structure. You'll need to know the exact structure of your JSON response to do this correctly.
If the newlines (\n
) and escaped characters (\
) are causing issues in parsing, you might need to use string manipulation functions in your Derived Column transformation to clean up the response before parsing it as JSON.