Learn R Programming

jsontools (version 0.1.0)

json_keys: Get keys of JSON object resp. array

Description

Get keys of JSON object resp. array

Usage

json_keys(x)

Arguments

x

A JSON vector

Value

A list of keys.

Examples

Run this code
# NOT RUN {
json_keys(c(
  '{"a": 1, "b": 2}',
  '{"x": 1, "y": 2}',
  "[1, 2]"
))
# }

Run the code above in your browser using DataLab