I am new to node js. I use Express JS and Hogan JS engine template. I know that we cannot use the logic in this template, but I need to execute the if statement inside the for statement in the view code to generate table fields. I have tried so many things, Even I follow these Hogan js links .
But there is only, if so, for example, a solution is given for both at the same time.
My details on this form
[
{
buln_id: 1,
name: 'Himanshu',
cname: 'India',
created_date: 'Tue Jul 07 2015',
state_name: 'Chandigarh',
city_name: 'Chandigarh',
locality_name: 'Behlana',
office_type_name: 'SCO',
office_number: '1234',
floor_no: 'ground floor',
section: 'a',
owner_name: 'RAvi',
mob_no: '123456789',
email_name: 'aaa@gmail.com',
web_name: 'sss.com',
landmark: 'sss',
bus_info: 'IT',
service: 'sss',
pay_details: 'Cash',
net_surrfing: 'a',
verification: 1
},
{
buln_id: 5,
name: 'User1',
cname: 'India',
created_date: 'Sat Aug 01 2015',
state_name: 'Chandigarh',
city_name: 'Chandigarh',
locality_name: 'Maloya',
office_type_name: 'SCF',
office_number: 'a',
floor_no: 'Ground Floor',
section: 'a',
owner_name: 'a',
mob_no: '123456789',
email_name: 'a@gmail.com',
web_name: 'a',
landmark: 'a',
bus_info: 'aa',
service: 'a',
pay_details: 'cash',
net_surrfing: 'mobile',
verification: 1
}
]
Here I want to generate a table according to the data and where it is check 1. I want to put a check sign, otherwise put a cross sign. Please help me, I am new to this area.
Thanks at Advance.