import { Observable } from "rxjs" import { queryService } from "../services/query.service" import { Entries, Storage } from "../services/query.service" let query = new queryService() let storageAddress: Storage = { type: "File", address: "payload.json" } let conditions: Entries[] = [ { msgId: "1e4d25a0-f30f-4590-be24-d43f246cd8c9" } ] query.query(storageAddress, ...conditions).subscribe((element) => {console.log(element.header.messageID)}) // 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 dffernt file storage location to determine how to prep the // data to be filtered