title: How to filter and map a complex json data?
body: <p>I have json data fetched from api and i want to filter this data first and retrieve only some json attributes. Here the json i have from my api get request :</p>
  
  <pre><code>[
      {
          "id": 3138,
          "date": "2020-04-25T19:59:42",
          "slug": "portrait-numero-2",
          "status": "publish",
          "type": "portrait",
          "link": "http://www.mywebsite.org/portrait/portrait-numero-2/",
          "title": {
              "rendered": "Portrait numéro 2"
          },
          "content": {
              "rendered": "&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non condimentum mauris. Nullam at quam maximus, blandit tellus quis, consectetur felis. In at dapibus mauris. Nunc eleifend libero sit amet feugiat rutrum. Maecenas a magna hendrerit, elementum sem sit amet, pulvinar mi. Aliquam tincidunt accumsan vestibulum. Praesent sed volutpat neque. Fusce enim ex, suscipit a efficitur eu, tincidunt et felis. Cras id commodo neque. Cras fringilla tempus ultrices. Donec consequat tellus id erat feugiat, sit amet pellentesque velit blandit. Sed vehicula lobortis.&lt;/p&gt;\n"
          },
          "excerpt": {
              "rendered": "&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non condimentum mauris. Nullam at quam maximus, blandit tellus quis, consectetur felis. In at dapibus mauris. Nunc eleifend libero sit amet feugiat rutrum. Maecenas a magna hendrerit, elementum sem sit amet, pulvinar mi. &lt;/p&gt;\n"
          },
  
          "tags": [
              78,
              65,
              69
          ],
          "acf": {
              "site_internet_": "http://www.mywebsite.org",
              "pays": "Finlande",
              "image_entreprise": {
                  "ID": 527,
                  "id": 527,
                  "url": "http://www.mywebsite.org/wp-content/uploads/2019/01/photo-4.jpg",
  
              }
          },
      },
      {
          "id": 3137,
          "date": "2020-04-25T19:22:16",
          "slug": "portrait-numero-1",
          "status": "publish",
          "type": "portrait",
          "link": "http://www.mywsebsite.org/portrait/portrait-numero-1/",
          "title": {
              "rendered": "Portrait numéro 1"
          },
          "content": {
              "rendered": Athènes ou Rome ?&lt;/figcaption&gt;&lt;/figure&gt;Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait numéro 1Portrait&lt;/p&gt;\n",
              "protected": false
          },
          "excerpt": {
              "rendered": "&lt;p&gt;Ceci est un extrait de l&amp;rsquo;article Ceci est un extrait de l&amp;rsquo;article Ceci est un extrait de l&amp;rsquo;article Ceci est un extrait de l&amp;rsquo;article Ceci est un extrait de  &lt;/p&gt;\n",
              "protected": false
          },
          "tags": [
              63,
              78,
              66
          ],
          "acf": {
              "site_internet_": "http://www.mywebsite.org",
              "telephone": "0909090999393",
              "pays": "Argentine",
              "image_entreprise": {
                  "ID": 528,
                  "id": 528,
                  "url": "http://www.mywebsite.org/wp-content/uploads/2019/01/photo-5.jpg"
  
              },
          },
      }
  ]
  </code></pre>
  
  <p>I want to retrieve this data : </p>
  
  <p>id (id of portrait), slug , title, excerpt, date (publish date of portrait),tags, content,
    featured_image_url ( url on the image i want to retrieve ).</p>
  
  <p>Here is my code  : </p>
  
  <pre><code> portraits = portraits
                  .filter(el =&gt; el.status === "publish")
                  .map(({id, slug, title, excerpt, date, tags, content, acf-&gt;image_entreprise-&gt;url}) =&gt; ({
                      id,
                      slug,
                      title,
                      excerpt,
                      date,
                      tags,
                      content,
                      featured_image_url
                  }));
  </code></pre>
  
  <p>I am getting the following error : </p>
  
  <pre><code>Syntax Error: Unexpected token, expected "," (69:73)                           friendly-errors 11:02:24
  
    67 |             portraits = portraits
    68 |                 .filter(el =&gt; el.status === "publish")
  &gt; 69 |                 .map(({id, slug, title, excerpt, date, tags, content, acf-&gt;image_entreprise-&gt;url}) =&gt; ({
       |                                                                          ^
    70 |                 id,
    71 |                 slug,
    72 |                 title,
  
                                                                                 friendly-errors 11:02:24
   @ ./.nuxt/store.js 10:24-52 21:4-26:6 21:45-26:5
   @ ./.nuxt/index.js
  </code></pre>
  
  <p>What is going wrong ? I don't understand the problem 
  Thank you for your help </p>