import { Observable } from "rxjs" import { queryService } from "../services/query.service" import { Entries, Storage } from "../services/query.service" import { _, isObject } from 'lodash' let query = new queryService() let storageAddress: Storage = { type: "File", address: "payload.json" } let conditions: any[] = [ { "msgDateTime": "2023-01-25T02:54:01.434Z" }, { "msgTag": "enterprise" } ] query.query(storageAddress, ...conditions).subscribe((element) => { console.log(`${element.header.messageName} is matched`) }) // the key is to do it in one line. Client just pass 2 arguments, one is the location of the data, which could be file, sql or mongodb, and also // pass in the conditions of their search enquiries. We will aslo have to cater to different file storage location to determine how to prep the // data to be filtered