I have this array in my data.js file. And I want to find the specific date from other html file to data.js file using javascript.
For example:
Here is the date to search
var searchDate = '12-25-2017';
I want to search that date from data.js file ( Variable name : jpHolidays )and show in html or console.log().
I was googling and i didn't find how to find the specific date. Please help me.
var jpHolidays = {
'01-01-2017' : '<span>お正月 <br> New Year\'s Day</span>',
'01-02-2017' : '<span>お正月 <br> New Year\'s Day observed</span>',
'01-09-2017' : '<span>成人の日 <br> Coming of Age Day</span>',
'02-11-2017' : '<span>建国記念日 <br> National Foundation Day</span>',
'03-20-2017' : '<span>春分の日 <br> Vernal Equinox Day</span>',
'04-29-2017' : '<span>昭和の日 <br> Shōwa Day</span>',
'05-03-2017' : '<span>憲法記念日 <br> Constitution Memorial Day</span>',
'05-04-2017' : '<span>みどりの日 <br> Greenery Day</span>',
'05-05-2017' : '<span>こどもの日 <br> Children\'s Day</span>',
'07-17-2017' : '<span>海の日 <br> Marine Day / Ocean Day</span>',
'08-11-2017' : '<span>山の日 <br> Mountain Day</span>',
'09-18-2017' : '<span>敬老の日 <br> Respect for the Aged Day</span>',
'09-23-2017' : '<span>秋分の日 <br> Autumnal Equinox Day</span>',
'10-09-2017' : '<span>体育の日 <br> Health and Sports Day </span>',
'11-03-2017' : '<span>文化の日 <br> Culture Day</span>',
'11-23-2017' : '<span>勤労感謝の日 <br> Labour Thanksgiving Day </span>',
'12-23-2017' : '<span>天皇誕生日 <br> The Emperor\'s Birthday</span>',
};