Skip to content

How does one convert JSON object with list into something iterable? #50

@markosski

Description

@markosski

I know I can access each indexing e.g. .get(0) but how do I iterate over it?

val list = jawn.ast.JParser.parseFromString("""{"stuff": [1,2,3]}""").get
val stuff = list.get("stuff")
for (item <- stuff) println(item)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions