Is there is a way in JavaScript to merge data from multiple XML files based on a specific condition, just as the following C# \[code\]from emp in empXmlFile.Descendants("employee")let activex = emp.Elements("Active").Last()where activex != null && (emp.Element("Deleted") == null & activex.Value != active.ToString(CultureInfo.InvariantCulture))join entity in entityDocument.Descendants("value")on emp.Elements("EntityType").Last().Value equals entity.Attribute("id").Valueselect new Data{ ID = emp.Attribute("id") != null ? emp.Attribute("id").Value : "", ProfileName = emp.Element("Profile_Name") != null ? emp.Elements("Profile_Name").Last().Value : "", Active = emp.Element("Active") != null ? emp.Elements("Active").Last().Value : "", EntityType = entity.Element("name") != null ? entity.Elements("name").Last().Value : ""}\[/code\]