Block contents in a variable?

I’m creating quite elaborate ld+json code: I want to represent an Organization that has 3 SportsActivityLocation, and I’d like to have 4 different blocks:


Since I came to create json code via dicts, can something like this be done?

{{ $activity1 := block "ActivityLocation1" }}

And then of course:

{{ $organization := dict
"@type" "Organization"
"location" (slice $activity1 $activity2 $activity3)

Or do I have to rewrite all the code of the three partials in the main “Organization” block?

In general, is there a way to handle this kind of including code from files, other than direct printing?

Thank you