We have updated our Terms of Service, Code of Conduct, and Addendum.

Is there a way to measure the size of a field and then only keep XX bytes of it?

Options

Is there a way to measure the size of a field and then only keep XX bytes of it? I have some huge events coming in from Corelight and it’s all from one field within the event.

Best Answer

  • Brandon McCombs
    Brandon McCombs Posts: 150 mod
    Answer ✓
    Options

    Every string has a .length property and every string has a .substring() method. Combining those will enable you to keep X bytes.

Answers

  • Brandon McCombs
    Brandon McCombs Posts: 150 mod
    Answer ✓
    Options

    Every string has a .length property and every string has a .substring() method. Combining those will enable you to keep X bytes.