[ad_1]
I m calling GET API by passing start date (2022-05-01) and end date (2022-05-31) to get emp list which is appears between this two date from mongodb. Below is the object in mongodb.
{
“emp_list” : [
“114”,
“118”
],
“pattern_code” : 15,
“effct_bgn_dt” : ISODate(“2022-04-01T05:30:00.000+05:30”),
“effct_end_dt” : ISODate(“2022-05-31T05:30:00.000+05:30”),
“source” : “ASSIGN_SHIFT”,
},
{
“emp_list” : [
“117”,
“115”
],
“pattern_code” : 30,
“effct_bgn_dt” : ISODate(“2022-05-01T05:30:00.000+05:30”),
“effct_end_dt” : ISODate(“2022-05-31T05:30:00.000+05:30”),
“source” : “ASSIGN_SHIFT”,
}
{
“emp_list” : [
“233”,
“400”
],
“pattern_code” : 30,
“effct_bgn_dt” : ISODate(“2022-08-01T05:30:00.000+05:30”),
“effct_end_dt” : ISODate(“2022-10-31T05:30:00.000+05:30”),
“source” : “ASSIGN_SHIFT”,
},
From above object, My expected output is first and second object i.e [114,118,117,115] why because this two objects appears between the above two date.
[ad_2]