findTypeByExample(examples, typesArray) {
    const mapTypes = {
      'boolean': 'boolean',
      'null': 'null',
      'undefined': 'null',
      'number': 'number',
      'bigInt': 'number',
      'object': 'object',
      'string': 'string'
    };
    let foundType,
      foundExample;
    for (let index = 0; index < examples.length; index++) {
      const example = examples[index];
      let exampleType = typeof example,
        mappedType = mapTypes[exampleType];

      if (mappedType === 'number') {
        mappedType = Number.isInteger(example) ? 'integer' : mappedType;
      }

      foundType = typesArray.find((type) => {
        return type === mappedType;
      });
      if (foundType) {
        foundExample = example;
        break;
      }
    }
    return { foundType, foundExample };
  }
Identifies the correct type from the list according to the example

@param {*} examples provided example values
@param {Array} typesArray the types array of the schema
@returns {string} the most according type to the example