Я пытаюсь превратить объект javascript в JSON. Объект правильно сформирован, и console.log(myObject)
вернет его правильно.JSON.stringify объекта возвращает только {}
Однако console.log(JSON.stringify(myObject));
возвращает только {}
Что я здесь отсутствует? Edit: рассматриваемый объект:
Object
autor: "Administrador"
descripcion: "At Google I/O 2015, everything we’ve seen and learned about is under the command of Sundar Pichai. In this exclusive interview, he walks us through his product vision.↵↵Subscribe: http://goo.gl/G5RXGs↵↵Check out our full video catalog: http://goo.gl/lfcGfq↵Visit our playlists: http://goo.gl/94XbKx↵Like The Verge on Facebook: http://goo.gl/2P1aGc↵Follow on Twitter: http://goo.gl/XTWX61↵Follow on Instagram: http://goo.gl/7ZeLvX↵Read More: http://www.theverge.com"
titulo: "The future of Google with Sundar Pichai"
url_imagen: "https://i.ytimg.com/vi/TguamcqrQjI/sddefault.jpg"
url_video: "https://www.youtube.com/embed/TguamcqrQjI"
__proto__: Object
редактировать: Вот как я создаю объект:
var myObject = {};
$http.get('apiCallToYoutubeIcantShareHereCauseItContainsAPrivateKey')
.success(function(data) {
myObject.titulo = data['items'][0]["snippet"]['title'];
myObject.descripcion = data['items'][0]["snippet"]['description'];
myObject.url_video ="https://www.youtube.com/embed/"+idYoutube;
myObject.url_imagen = data['items'][0]["snippet"]['thumbnails']['standard']["url"];
myObject.autor = 'Administrador';
});
, что делает 'myObject' выглядеть? – AmmarCSE
@AmmarCSE вот так: http://imgur.com/zsGFl76 – kace91
@ kace91 Не добавить изображение добавить его в текст – Tushar