Skip to content

Instantly share code, notes, and snippets.

@ohabash
ohabash / cloudSettings
Last active November 20, 2019 19:54
vsCode
{"lastUpload":"2019-11-20T19:54:39.637Z","extensionVersion":"v3.4.3"}
configsWithP(): any {
const configs = this.configsService.getConfigsList;
const product = (id) => this.bcProductService.getProductById(id);
this.test_configs = configs.pipe(flatMap( configs_ret => {
const final = (configs_ret as any[]).map(config => product(config.id));
return zip(...final, (...args: any[]) => args).map(products => {
for (let i = 0; i < (configs_ret as any[]).length; i++) {
configs_ret[i]['p']=products[i].data;
}
return configs_ret;