Just by reading your post, I think you can do this:
set a variable into text: get all JSON data you want to retrieve and connect these data with a unique string.
E.g., Set Local__myVar to:
%JSONValue%Item.value.Template%UNIQUESTRING%JSONValue%Item.value.Whatever%UNIQUESTRING%JSONValue%Item.value.Whatever%
Search that variable with RegEx and save them into the variables. See the example here given by @JMichaelTX :