In short. Solve this:
module Main exposing (..)
import Html
-- import Json.Decode exposing (Decoder, decodeString, keyValuePairs)
json : String
json =
"""[{a: 1, foo: "bar", bar: "baz"},
{a: 2, foo: "baz", bar: "foo"},
{a: 34, foo: "big", bar: "lebowski"}]"""
gen_keys : String -> Str
I love Elm and I strongly believe that it's the future, but I can't solve
this one use-case that's stopping me from using it.
I have a list of JSON objects like this:
[{a: 1, foo: "bar", bar: "baz"},
{a: 2, foo: "baz", bar: "foo"},
{a: 34, foo: "big", bar: "lebowski"}]
At runtime the co
sically, you can keep encoding things as this generic
> "Json.Encode.Value" type, and nesting them inside one another. From Elm's
> perspective, they're all the same type, so where javascript arrays could
> have multiple things in them (e.g. ["one", 2, {3
Hi guys,
I have a reporting app where actions by the user generate arbitrary lists
of objects(records) coming back from a JSON store. I do not know at
compile time what the fields in the objects(records) will be. Can Elm do
this? How?
Thanks in advance!
--
You received this message becaus