#Can't seem to get Lookup working correctly

28 messages · Page 1 of 1 (latest)

unkempt crane
#

I am new to Angular and I made a backend using Express and Mongoose in which I wrote a get method to lookup two categories and combine them. I need to show specific products and the bid information for each product. Although I believe the bids are attached correctly, I don't have access to them in my Angular functions.

I am used to Java and SQL so a bit confused. Can anyone offer some help? Would be immensely grateful.

rocky egret
#

Hi you would need to provide details as it's all about your code. Please mind using #off-topic will be more appropriate if that's about the express code.

unkempt crane
#

Well I am trying to use *ngFor to access bids here:

#

But perhaps I am just way off base

#

The bid info is there but my noob mind cant access it

rocky egret
#

Can you illustrate the I don't have access to them in my Angular functions. part with your functions?

unkempt crane
#

sure one sec

#

I'm sure its something like I cant use dot notation to reach an embedded object or something but not sure what to do

rocky egret
#

Please provide the Product interface code (and copy code here directly, tha'ts easier to read to to copy for answers

#

g!codeblock @unkempt crane to format it

green widgetBOT
#

@unkempt crane, you can use the following snippet to have your code formatted and colored by Discord. Replace ts with the language you need (i.e. html, js, css, etc)
```ts
// your code goes here
```

unkempt crane
rocky egret
#

While it's present in your data, you are telling your code there is no bids in the model but you try to access it

unkempt crane
#

g!codeblock I tried to use a lookup to ocmbine the bids and the products

green widgetBOT
#

@unkempt crane, you can use the following snippet to have your code formatted and colored by Discord. Replace ts with the language you need (i.e. html, js, css, etc)
```ts
// your code goes here
```

unkempt crane
rocky egret
unkempt crane
#

which then gives me something like this

#

So I should add bids to the product model?

rocky egret
#

You need to update your model to match your data model

rocky egret
unkempt crane
#

ok thank you so much

rocky egret