JSON Response In Javascript

I am using DEEP AI for WhatsAsena (World’s first UserBot for WhatsApp)
And ı’m not good at json 😅
Sooo here is my code:

Asena.addCommand({pattern: 'faceai ?(.*)', fromMe: true, deleteCommand: false, dontAddCommandList: true}, (async (message, match) => {
    if (match[1] === '') return await message.sendMessage('Need İmage URL');

    var resp = await deepai.callStandardApi("facial-recognition", {
        image: `${match[1]}`,

    });

    await message.reply(`Output: ${resp}`);

}));

When I am using local terminal the output is:

{
    'id': 'aa4905c4-be34-491b-ac6c-029388ab137b',
    'output': {
        'expressions': [ {
            'emotion': 'fear',
            'bounding_box': [111, 171, 269, 269],
            'confidence': '0.91'
        } ]
    }
}

I m using ${resp} but ı want to scrape [{’emotions’: ‘fear’

I want to like this;

Output: fear, happy.. etc

Only emotions. How can I do that?

97 thoughts on “JSON Response In Javascript”

  1. It’s appropriate time to make some plans for the future and it
    is time to be happy. I have read this post and if I could I wish to suggest
    you few interesting things or tips. Perhaps you can write next articles referring to
    this article. I wish to read more things about it!

    Reply
  2. certainly like your web site however you need to
    test the spelling on several of your posts. Many of them are
    rife with spelling issues and I find it very bothersome
    to tell the truth nevertheless I will certainly come again again.

    Reply
  3. It is perfect time to make a few plans for the future
    and it’s time to be happy. I have learn this post and if I may I wish to counsel you some attention-grabbing things or advice.
    Perhaps you can write subsequent articles regarding this article.
    I want to learn more issues about it!

    Reply
  4. It is perfect time to make a few plans for the future and it is time to be happy.
    I have learn this publish and if I may I wish to counsel you few attention-grabbing things or suggestions.
    Maybe you could write next articles regarding this article.
    I desire to learn even more issues approximately it!

    Reply
  5. It’s perfect time to make some plans for the future and it
    is time to be happy. I have read this post and if I could I desire to suggest you few interesting things
    or suggestions. Maybe you can write next articles referring to this article.
    I desire to read even more things about it!

    Reply