Question: Has the company produced a statement in relation to any Modern Slavery legislation or Act?
Answer:
Yes
GreenDex
Modern Slavery Statement
Ted Baker
2021
Verified by Community check_circle

answers = [a1, a2]
mapper = {
  'Yes': 'Yes'
  'No': 'No'
  'Yes - UK Modern Slavery Act': 'Yes'
  'Yes - California Transparency in Supply Chains Act': 'Yes'
  'Yes - Australian Modern Slavery Act': 'Yes'
  'Yes - Norwegian Transparency Act': 'Yes'
  'Yes - Canadian Act': 'Yes'
  'No - neither': 'No'
  }

mapAnswer = (answer) ->
  if answer of mapper
    return mapper[answer]
  if Array.isArray answer
    for category in answer
      if category of mapper
        return mapper[category]
  "Unknown"

mappedAnswers = answers.map (answer) -> mapAnswer(answer)

mappedAnswers[0]

Comments