Hi all, I’ve got a problem whereby I need to extract some data from a serialized data string that has come from a websites product export.
An example of the serialized data is shown below:
a:2:{s:9:“pa_colour”;a:7:{s:4:“name”;s:9:“pa_colour”;s:5:“value”;s:4:“Grey”;s:8:“position”;i:0;s:10:“is_visible”;i:1;s:12:“is_variation”;i:1;s:11:“is_taxonomy”;i:1;s:24:“is_create_taxonomy_terms”;i:1;}s:11:“pa_material”;a:7:{s:4:“name”;s:11:“pa_material”;s:5:“value”;s:5:“Tweed”;s:8:“position”;i:1;s:10:“is_visible”;i:1;s:12:“is_variation”;i:1;s:11:“is_taxonomy”;i:1;s:24:“is_create_taxonomy_terms”;i:1;}}
The text I need to extract from the serialized data for each product is:
- pa_colour
- pa_material
So I would need the values ‘Grey’ and ‘Tweed’ in to separate columns in my sheet for the above example.
Can anyone help with a suggestion of how to achieve this?
All help greatly appreciated. Thanks in advance!