Help: #howto Build Recipe "database" in Obsidian (complex)

Love the ingredients by category TOC! Is it possible to do this without tags? I was hoping to use ‘type: recipe’ and ‘type:ingredient’ and ‘type:moc’ in my YAML instead of tags. Instead of dv.pages("#ingredient and -#toc") how would you say ‘give me pages with type = ingredient’?

Nevermind, I figured it out! For anyone else wanting to do this, replace:
for (let entry of dv.pages('"Ingredients" and #ingredient and -#toc')
with:
for (let entry of dv.pages('"Ingredients"').where(p => p.type == "ingredient")

2 Likes

Does using cooking amounts using something like 3/4 cup or 1/2 tsp mess up the js table?
Here is my list of ingredients
Ingredients:

  • 3/4 cup milk
  • 1 egg
  • 1 cup shredded cheddar cheese
  • 1/2 cup quick cooking oats
  • 1/2 cup plain breadcrumbs
  • 1/2 cup chopped onion
  • 1 teaspoon salt
  • 1 pound lean ground beef
  • 2/3 cup ketchup
  • 1/2 cup packed light brown sugar
  • 1 1/2 teaspoons prepared yellow mustard
  • 1 large onion

And this is what I am getting

  • NaN undefined 3

  • NaN 1

  • NaN 1

  • NaN undefined 1

  • NaN undefined 1

  • NaN undefined 1

  • NaN 1

  • NaN 1

  • NaN undefined 2

  • NaN undefined 1

  • NaN 1

  • NaN 1

Fractions are not interpreted as numerals, unfortunately. If you write 1/2 as 0.5 (etc…) it should work fine for you