Skip to main content
Question

can I loop through an array and convert the values?

  • March 11, 2025
  • 5 replies
  • 4 views

Eugene Katz

Is there a way I can loop through this array and convert the values to `'%Y-%m-%dT%H:%M:%S'`

5 replies

You could use a <https://docs.cribl.io/stream/code-function|Code Function> + https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map|Array.map()```try { __e["push_results"] = __e["push_results"] .map(el => { return C.Time.strftime(el, '%Y-%m-%dT%H:%M:%S') })} catch (err) {}```


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

You'll need a Code function.... haha there it is


Hehehe


Eugene Katz
  • Author
  • Employee
  • March 11, 2025

Worked perfectly, thank you both


WOOHOO!