On Wed, 03 Oct 2012 00:28:02 +0200, romain337 wrote:
Hello,
This is my question about to!string and the Json object.
I have an Json object that contains some strings, and when i want to grab one of them, i use this code:
auto myValue = to!(string)(myJsonObject.opIndex("foo");
then, in the template, i want to print it, so i use
span Name: #{myValue}
the result, is "myValue" with the quotes.
Is this normal? Sorry, maybe it's a dumb question. I'm not so familiar with json, mongodb, and the web applications :/
the json string looks like this:
{
"foo" : "bar",
"bar" : "foo",
"one" : "two",
...
}Thanks
edit* > the result, is "myValue" with the quotes.
the result is "the value of the var" with the quote