A
A
AndreySergienko2022-03-22 16:43:35
JavaScript
AndreySergienko, 2022-03-22 16:43:35

How to iterate only part of object's fields?

My task is to draw the table in such a way that the object id is ignored.
Tried to enumerate for the field, didn't work.

<tr
          :class="['table__element table__head', i % 2 ? '' : 'table__element-second']"
          v-for="(element, i) in tableList"
          :key="i"
        >
          <td v-for="cell in element" :key="cell" class="table__head">
            {{ cell }}
          </td>
        </tr>


An example of an object that comes in:
{
         decode: `
         Разнообразный и богатый опыт укрепление и развитие структуры играет важную роль в формировании позиций
         `,
           code: '1235',
           date: '11.12.2012 12:47:30',
           id: 1 
        },

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
low molecular macro, 2022-03-22
@molekulyarniy

I think you should prepare another data set in advance, but without the id property. And iterate already it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question