<%
if(result && result.length > 0){
result.map((records,index)=>{
let stateName = (records._id) ? records._id : 'N/A'
%>
<%= stateName%>
<%
records.distributors.map((distributors,index)=>{
let name = (distributors.name) ? distributors.name : 'N/A'
let address = (distributors.address) ? distributors.address : 'N/A'
%>
-
<%= name%>
<%- nl2br(address)%>
<% }) %>
<% })
}
%>