Is there a way to extract shortcode information from a string and organize it in an array of objects? For example:
var str = 'First shortcode is [fraction num="1" denom="2"] and the second is [square-root content="456"] which we will pass into a function which will return these IDs and all their values in an array of objects like below';
var obj = parseShortcodes(str);
// obj now equals:
[
{
id: 'fraction',
num: 1,
denom: 2
},
{
id: 'square-root',
content: 456
}
]