code: function flattenObject(target, id) {
    const output = {};
  
    if (id) {
      output._id = id;
    }
  
    flattenStep(output, target);
  
    return output;
  }
docs: Flatten an object transform:
  {
  title: "kuzzle",
  info : {
  tag: "news"
  }
  }
  
  Into an object like:
  {
  title: "kuzzle",
  info.tag: news
  }
  
  @param {object} target the object we have to flatten
  @param {string} [id] of the document, if relevant
  @returns {object} the flattened object