0

I want to know how many percent of the data function is filled;

console.log(this.$data);

This is giving that

enter image description here

I am planing to count all of these fields. Even if they are an object I will count each key of object.

Then I am planing to also count which one of them is filled. Then i will get percent. If you thing there is better I need your help.

Atif Şeşu
  • 125
  • 11
  • what is your definition of ' full ' ? for each key ? non null values ? is an empty array value considered full or empty ? – Mihai T Nov 04 '20 at 13:09
  • array can be skiped just if length of array bigger than 0 it will be full for me, for object yes i want to check each key from each object and also string – Atif Şeşu Nov 04 '20 at 13:22
  • Well firstly properly define what ' empty ' or ' full ' means. But yes, you can filter the array of object values . get the length. and use that to get the percentage. – Mihai T Nov 04 '20 at 13:24
  • these all datas is already defined when page loaded,but they are empty. user will fill them step by step. Just because most of them is nullable and i want to make user fill them as much as possible i want to show them how many percent of all filled has filled by any value. Instead of full i meant filled sorry. – Atif Şeşu Nov 04 '20 at 13:42

0 Answers0