Command output as json format.

How can I get json format output form this kind of commands.

:foreach i in=[/ppp secret find] do={ :put [/ppp secret get $i name]; }

I want these kinds of output

{"name":"John","profile":"large pack"},
{"name":"bon","profile":"small pack"}