In my code I’m getting a js.Vale
that is a simple object {“Age”:19}
For displaying it, I used:
data := fmt.Sprintf("Age: %v, value.Get("age"))
fmt.Println(data)
But the output was:
Age: <number: 19>
Expected output is:
Age: 19
Once I replaced the %v
by %d
to be:
data := fmt.Sprintf("Age: %v, value.Get("age"))
fmt.Println(data)
I got:
Age: {[] 4626041242239631360 0}