I want to be able to define a property based on another property in the same method. For example, having the url
property being a copy of the name
property but toLowerCase. How can I achieve this?
[
{
id:0,
name:"Logitech G G512 GX Brown Türkçe RGB Mekanik Gaming Klavye",
image:"/urun_demo/urun1.png",
old_price:900,
current_price:800,
stock:10,
url:name.toLowerCase()
},
{
id:0,
name:"SUPER/AMD RYZEN 5 3600/GIGABYTE GeForce GTX 1660 SUPER OC 6GB/16GB DDR4/500GB NV",
image:"/urun_demo/urun2.png",
old_price:700,
current_price:600,
stock:10,
url:name.toLowerCase()
}
]