Get Number Frequency

EasyUiPath

Prompt

Write a function named getNumberFrequency that takes an array of numbers as an argument and returns an object containing the frequency count of each number in the array.

  • The function should count the occurrences of each number in the input array.
  • The output should be an object where the keys are the numbers (as strings) and the values are their frequencies.
  • The function should handle nested arrays (one level deep).