1

I have a wordpress blog json feed which has embedded youtube url present in

JSON

content:'some lots of html tags with '

I can access content using json object.content but i need embedded youtube url. how to get this. is there any other way ? thanks

New2Byte
  • 27
  • 9
  • Personally I would un-embed it: Add a extra "youtube" field using [advanced custom fields](https://wordpress.org/plugins/advanced-custom-fields/) and use [WP Rest api custom fields](https://wordpress.org/plugins/wp-rest-api-custom-fields/) to be able to get access the field using wp-json. Of course, if you already have tons of posts that might be unfeasable, and you have to resort to parsing the content. Then you should have a look at this question: http://stackoverflow.com/questions/3452546/javascript-regex-how-to-get-youtube-video-id-from-url – ippi Sep 11 '15 at 09:43

0 Answers0