package com.vaessl.app.search;

import java.util.Map;

public record SearchResponse(String title, String description, Map<String, Object> extraData) {

    public String getExtra(String key) {
        if (extraData == null) {
            return null;
        } else {
            Object value = extraData.get(key);

            return value != null ? String.valueOf(value) : null;
        }
    }
}
