I have a proplist like this:
{ok,{todo,"todo-21","Foo2"}}
How can I get the without the "ok"?
I would like to output this as json in my controller:
{json, {todo,"todo-21","Foo2"}}
Is there some nifty way to do this?
I have a proplist like this:
{ok,{todo,"todo-21","Foo2"}}
How can I get the without the "ok"?
I would like to output this as json in my controller:
{json, {todo,"todo-21","Foo2"}}
Is there some nifty way to do this?
Pretty simple, I would say:
tojson({ok,Todo}) -> {json, Todo}.
tojson({ok,{todo,"todo-21","Foo2"}}).