Skip to content

Instantly share code, notes, and snippets.


Yardanico/near.nim Secret

Created Aug 1, 2020
What would you like to do?
import json
KeyValue = tuple[key: string; val: string]
proc tt(x: KeyValue) =
var it = x
let a = (it.key, it.val)
echo a
proc encodedQuery(node: JsonNode): string =
var query: seq[KeyValue]
for q in node.pairs:
query.add (key: "hello", val: $q.val)
for elem in query:
proc main =
var cq = newJObject()
cq["a"] = newJInt(1)
cq["b"] = newJInt(2)
let enc = cq.encodedQuery()
echo enc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment