code: function (data) {
  
                          var lines = data.match(/[^\r\n]+/g); //cut lines
  
                          return lines.map(function (line) {
                              try {
                                  return JSON.parse(line);
                              } catch (e) {
                                  return line;
                              }
                          });
                      }
docs: As logs are lines of JSON, we want to parse each lines one by one