Can anyone help me with an example for std.lines(arr) function of Jsonnet? I am trying to create a bash script to clone multiple git repositories using values from an array. My array structure is given below.
gitRepo : [
{
github_repo: "github.com/abcd.git",
github_id: "tom",
github_access_token: "1aae0a6dc19aef327565"
},
{
github_repo: "github.com/qwerty.git",
github_id: "alice",
github_access_token: "2e2eef327565"
},
],
}
Thanks in advance...
Found a solution for this from jsonnet google groups.
test it with
jsonnet -S test.jsonnet
. (Note the Capital-S
flag)https://groups.google.com/forum/#!searchin/jsonnet/array%7Csort:date/jsonnet/SGADdQQ-vBs/Tig8DnsRBQAJ