JSON-LD: creating an AggregateOffer from many shortcode

If you have full control over the system, it would be best to get all of the data by some other means.

If you must concatenate the shortcodes, you can parse the content to get the shortcodes with get_shortcode_regex().

You can save all the matches, and their attributes, and remove them from the content.
Then, you can either move them all to the end (or where ever you want them) or process them to get whatever data you need.

On the other hand, you could just use microdata schema markup in your html instead of the JSON-LD format. For an example, see Example 1 here and click the microdata tab.

Hope this helps

tech