I
I
Igor Vasiliev2021-04-22 18:30:16
API
Igor Vasiliev, 2021-04-22 18:30:16

JSON, key with slash, how to get value?

Hello
-
My background:
I have been working with requests and APIs for a long time, and I know very well how to get a key, or a value, or how to get a value by a key, but I first encountered slashes in the key when I started working with the WordPress API .

As you can see from the screenshot, I received a json with a key /oembed/1.0
60819451b1248030327561.png

If you think this is a joke, make a request:
https://yoursite.zona/wp-json/oembed/1.0

Question:

Where else in WordPress is there information about the list of languages ​​(multi-language) in WordPress API
Is it possible to process such key somehow to get {wpml_language.enum}

PSIf someone doesn't understand what I'm doing, I explain, I get WordPress data through the API to display this data using a JavaScript framework. I'm making a dynamic site without reloading pages.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-04-22
@Isolution666

field["a/b/c"]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question