# typescript


11/30/2021, 1:33 AM
I occasionally see queries on how to build JSON using outputs. I'd solved the problem a few times, so it was time to make it re-usable. It's pretty dumb, but it's all I need right now. Simple builder pattern, add the properties you want in the JSON output, then call toJson().
🎉 2
Fills the same role as pulumi.interpolate``.
I bet there's some nice way to make this much more powerful with almost no effort, but I don't know the JSON library.. might look into it though...